package cz.pproproj.aaservice.aasbllmodule.authentication;

import cz.pproproj.aaservice.guimodule.model.AuthenticationException;
import cz.pproproj.aaservice.guimodule.model.Credentials;

import java.util.List;

/**
 * @author David
 * @since 17. 1. 2015
 */
public interface AuthenticationDataAccess {

    /**
     * Method which authenticate user in defined data module
     * @param user object which contains entered credentials
     * @return true if authentication was successful else otherwise
     */
    boolean authenticate(AuthenticationUser user) throws AuthenticationException;

    String addUser(AuthenticationUser user) throws AuthenticationException;

    void deleteUser(AuthenticationUser user) throws AuthenticationException;

    String getConfigurationDirName();

    List<AuthenticationUser> getAllUsers();
}
